<?php
class MallAction extends BaseAction
{
	public function _initialize()
	{
		$this->assign('nav', 2);
		parent::_initialize();
	}

	public function index()
	{
	}

	/**
	 * 商场首页
	 * @param array $mall
	 * @author Ice <iceinto@mallog.com.cn>
	 */
	public function home($mall)
	{
		$params = array();
		$params['initial'] = $mall['initial'];
		$mallData = $this->getUrlData('mallog.malls.item','pic_url,id,name,initial',$params);
		$mid = $mall['id'];
		unset($params);
		$params['id'] = $mid;
		$floorNews = $this->getUrlData('mallog.floor.getnews', null,$params);
		$this->assign('fns', $floorNews['data']['floornews']);
		$this->assign('mall', $mallData['data']);
        $this->assign('web_title', $mallData['data']['name']);
		$this->display("Mall:home");
	}

	/**
	 * 获取商场楼层下品牌情况
	 * @param array $mall
	 * @param array $floor
	 * @author Ice <iceinto@mallog.com.cn>
	 */
	public function floor($mall, $floor){
		$params = array();
		$params['initial'] = $mall['initial'];
		$mallData = $this->getUrlData('mallog.malls.item','pic_url,id,name,initial',$params);
		unset($params);
		$params = array();
		$params['mid'] = $mall['id'];
		$params['fid'] = $floor['id'];
		$brands = $this->getUrlData('mallog.floor.brands',null,$params);
		$this->assign('mall', $mallData['data']);
		$this->assign('brands', $brands['data']);
        $this->assign('web_title', $floor['sain'].' '.$floor['name']);
		$this->display("Mall:floor");
	}
}

?>